package doudou.pojo;

import java.io.Serializable;

//三个套餐的父类
public class ServicePackage implements Serializable {
    String serviceName;
    double price;
    int talkTime;  // 通话时长（分钟）
    int flow;      // 上网流量（GB）
    int smsCount;  // 短信条数

    public ServicePackage(String serviceName,double price, int talkTime, int flow, int smsCount) {
        this.price = price;
        this.talkTime = talkTime;
        this.flow = flow;
        this.smsCount = smsCount;
        this.serviceName=serviceName;
    }

    public void showInfo() {
        System.out.println("套餐名称:"+this.serviceName);
        System.out.println("套餐资费:" + this.price + "元/月");
        System.out.println("通话时长:" + this.talkTime + "分钟/月");
        System.out.println("上网流量:" + this.flow + "MB/月");
        System.out.println("短信条数:" + this.smsCount + "条/月");
    }

    public String getServiceName() {
        return serviceName;
    }

    public double getPrice() {
        return price;
    }

    public int getTalkTime() {
        return talkTime;
    }

    public int getFlow() {
        return flow;
    }

    public int getSmsCount() {
        return smsCount;
    }
}
